from fastapi import APIRouter
from fastapi import Depends
from fastapi.responses import JSONResponse
from pydantic import BaseModel
from typing import Optional

router = APIRouter()


class Item(BaseModel):
    name: str
    description: Optional[str] = None
    price: float
    tax: Optional[float] = None


# @router.get(
#     path="/test_again{a}",
#     name="comments:get-comments-for-article",
# )
@router.post(
    path="/test_post_path",
    name="测试下",
)
async def test_url(item: Item):
    return item
